<?php

namespace app\admin\model\live;

use app\admin\model\store\Goods;
use app\common\model\TimeModel;

class LiveGoods extends TimeModel
{

    protected $name = "live_goods";

    protected $deleteTime = "delete_time";

    
    public function liveGoods()
    {
        $field = ['id','goods_name','image','template_id'];
        return $this->belongsTo(Goods::class,'goods_id','id')
            ->field($field)
            ->where('goods_stock','>',0);
    }

}